Skip to content

fix(auth): handle edge-to-edge insets in MFA challenge and auth screens#2413

Open
demolaf wants to merge 3 commits into
version-10.0.0-beta04from
fix/mfa-edge-to-edge-insets
Open

fix(auth): handle edge-to-edge insets in MFA challenge and auth screens#2413
demolaf wants to merge 3 commits into
version-10.0.0-beta04from
fix/mfa-edge-to-edge-insets

Conversation

@demolaf

@demolaf demolaf commented Jul 22, 2026

Copy link
Copy Markdown
Member

Fixes #2403.

The MFA challenge screen had no inset handling, so its title collided with the status bar/camera cutout on edge-to-edge devices. Also found a related, opposite bug in six other auth screens combining Scaffold's innerPadding with a redundant, double-counted safeDrawingPadding() call.

  • MfaChallengeDefaults.kt: wrapped DefaultMfaChallengeContent in a Scaffold
  • SignInUI, SignUpUI, SignInEmailLinkUI, ResetPasswordUI, EnterPhoneNumberUI, EnterVerificationCodeUI: removed the redundant .safeDrawingPadding(), added a uniform 16.dp margin
  • FirebaseAuthScreen.customMethodPickerLayout now renders full-screen (was Scaffold-confined) so fully custom layouts can go edge-to-edge; direct behavior change since library is pre-1.0

Preview

Screenshot_1784708851

demolaf and others added 2 commits July 17, 2026 09:21
…2383)

* fix(auth): validate display name only when required in sign-up form

* fix(auth): use locale-safe matcher for sign-up button in test

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the custom method picker layout to render edge-to-edge across the entire screen, bypassing the default Scaffold and terms configuration when a custom layout is provided. It also cleans up safeDrawingPadding across several email and phone auth screens and wraps the MFA challenge content in a Scaffold. The review feedback suggests optimizing the MFA challenge layout by applying padding directly to the root Column instead of using a Scaffold, updating an outdated KDoc comment in the preview, and reverting several helper functions and composables in the demo activity back to private visibility to maintain proper encapsulation.

Comment thread app/src/main/java/com/firebaseui/android/demo/CustomMethodPickerDemoActivity.kt Outdated
Comment thread app/src/main/java/com/firebaseui/android/demo/CustomMethodPickerDemoActivity.kt Outdated
Comment thread app/src/main/java/com/firebaseui/android/demo/CustomMethodPickerDemoActivity.kt Outdated
@demolaf demolaf linked an issue Jul 22, 2026 that may be closed by this pull request
@demolaf
demolaf force-pushed the version-10.0.0-beta04 branch from d382bd5 to 1ecd498 Compare July 22, 2026 22:13

@russellwheatley russellwheatley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of suggestions on the customMethodPickerLayout changes below.

Also, this branch looks like it's stacked on top of the unmerged display-name-validation fix (d382bd5) rather than rebased onto version-10.0.0-beta04, so the diff here currently pulls in an unrelated SignUpUI/SignUpUITest.kt change. Can you rebase onto the base branch before merge so the diff only has your two commits?

* state themselves. When provided, it receives the current [AuthState] alongside an
* [AuthSuccessUiContext] containing common callbacks (sign out, manage MFA, reload user).
* @param customMethodPickerLayout Optional slot that fully replaces the method-picker screen.
* When provided, it renders as the *entire* screen content — edge-to-edge, with no logo, no

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This says customMethodPickerLayout always renders full-screen with no ToS footer, but ReauthSheetContent's call site doesn't match, it's still Scaffold-wrapped and still shows the footer. Can you scope this KDoc to the primary flow only, or make ReauthSheetContent consistent with the new behavior?

onProviderSelected = onProviderSelected,
)
if (customMethodPickerLayout != null) {
Box(modifier = modifier.fillMaxSize()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No test covers the new full-screen/no-chrome behavior here. Worth adding one that asserts the logo/footer aren't rendered when customMethodPickerLayout is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The default UI of the MFA does not handle edge-to-edge properly.

2 participants